#um321xf
cmake_minimum_required(VERSION 3.22)

project(um321xf)
add_library(um321xf INTERFACE)

# Enable CMake support for ASM and C languages
enable_language(C ASM)

target_compile_definitions(um321xf INTERFACE
    #$<$<CONFIG:Debug>:DEBUG>
)

target_include_directories(um321xf INTERFACE
		../../Driver/UM321xF_HAL_Driver/Inc
    	../../Driver/CMSIS/Device/Include
    	../../Driver/CMSIS/Include
)

target_sources(um321xf INTERFACE
		../../Core/Src/syscalls.c
		../../Core/Src/sysmem.c
		../../Driver/UM321xF_HAL_Driver/Src/gpio.c
		../../Driver/UM321xF_HAL_Driver/Src/uart0.c
		../../Driver/UM321xF_HAL_Driver/Src/uart1.c
		../../Driver/UM321xF_HAL_Driver/Src/uart2.c
		../../Driver/CMSIS/Device/Source/system_um321xF.c
		../../startup_um321xf.s
)

target_link_directories(um321xf INTERFACE

)

target_link_libraries(um321xf INTERFACE

)

# Validate that STM32CubeMX code is compatible with C standard
if(CMAKE_C_STANDARD LESS 11)
    message(ERROR "code requires C11 or higher")
endif()


